﻿@model IEnumerable<Fmis21_10.Models.Match>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="flat-table flat-table-3">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Round)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Tournament.TournamentName)
        </th>
       @* <th>
            @Html.DisplayNameFor(model => model.Stadium.StadiumName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Match1)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Time)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Location)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Weather)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.MatchSupervision)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.RefereeSupervision)
        </th>*@
        <th>
            @Html.DisplayNameFor(model => model.HomeTeam)
        </th>
        <th colspan="2">
            Score
            @*@Html.DisplayNameFor(model => model.ScoreHomeTeam)
        
        
            @Html.DisplayNameFor(model => model.ScoreAwayTeam)*@
        </th>
        <th>
            @Html.DisplayNameFor(model => model.AwayTeam)
        </th>
        
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Round)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Tournament.TournamentName)
        </td>
       @* <td>
            @Html.DisplayFor(modelItem => item.Stadium.StadiumName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Match1)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Time)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Location)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Weather)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.MatchSupervision)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.RefereeSupervision)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.HomeTeam)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ScoreHomeTeam)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ScoreAwayTeam)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.AwayTeam)
        </td>
        
        <td>
            @Html.ActionLink("UpdateScore", "UpdateScoretenten", null, new { id = item.MatchId }, new { @class="modal"}) |
            @*@Html.ActionLink("Edit", "Edit", new { id=item.MatchId })*@ 
            @Html.ActionLink("Details", "Details", new { id=item.MatchId }) |
            @*@Html.ActionLink("Delete", "Delete", new { id=item.MatchId })*@
        </td>
    </tr>
}

</table>


